/*
Copyright (c) [2019年5月1日] [吴超]
[MBT_Studio] is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
		 http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
See the Mulan PSL v2 for more details.
*/
#include "物体节点构建.h"

#include <节点/物体/物体节点.h>
#include <节点/物体/动画点.h>
#include <节点/物体/蒙皮骨骼.h>
#include <节点/物体/灯光节点.h>

#include <节点/插座/list/list物体插座.h>





static C_外部加载物体节点* g_物体加载节点 = nullptr;





static void on_参数修改更新节点(S_Props& prop) {
	//switch ((*(S_PropValueEnum*)prop.m_Value).m_当前选项)
	auto nodes = f_global_get激活节点();
	for (auto 节点 : nodes) {
		节点->f_set是否要更新(true);
	}
}


static void on_加载模型更新节点(S_Props& prop) {
	E_对话框类型 类型 = E_对话框类型::e_读取;

	auto nodes = f_global_get激活节点();
	for (auto 节点 : nodes) {
		C_外部加载物体节点* node = dynamic_cast<C_外部加载物体节点*>(节点);
		if (node) {
			if (f_prop_Bool(node->m_是否递归目录)) {
				类型 = E_对话框类型::e_打开路径;
				break;
			}
		}
	}

	f_ui_set路径编辑框对话框类型(prop.m_UI->m_部件, 类型);
	f_ui_set路径编辑框对话框后缀(prop.m_UI->m_部件, ".fbx");

	if (f_ui_路径编辑框是否打开(prop.m_UI->m_部件)) {
		for (auto 节点 : nodes) {
			节点->f_set是否要更新(true);
		}
	}
	
}


static void on_区域光参数修改更新节点(S_Props& prop) {
	auto nodes = f_global_get激活节点();
	for (auto 节点 : nodes) {
		C_区域光节点* 区域光节点 = dynamic_cast<C_区域光节点*>(节点);
		区域光节点->f_切换区域光形状();
		节点->f_set是否要更新(true);
	}
}






static void f_物体节点_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_物体节点* node = dynamic_cast<C_物体节点*>(((C_节点面板*)obj)->m_NodeData);

	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);
	node->m_物体类型.m_UI->m_Update = on_参数修改更新节点;
	props.push_back(node->m_物体类型);

	plane->f_构建属性部件(props);

}

C_节点面板* f_节点构建_物体节点(S_UI创建环境& ctx, S_设备环境& view3D_ctx, C_节点基类* node, C_节点树* tree) {
	if (!node) node = new C_物体节点(view3D_ctx);
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_物体节点(plane, node);
	
	return plane;
}

void f_节点重置_物体节点(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板重构(plane, node, E_节点区类型::e_节点区_节点视图);
	f_节点重构_插座重构(plane, node, E_节点区类型::e_节点区_节点视图);

	plane->m_属性面板参数构建 = f_物体节点_部件构建属性;
	plane->m_ICO = "objects";
}





static void f_引用物体节点_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_引用物体节点* node = dynamic_cast<C_引用物体节点*>(((C_节点面板*)obj)->m_NodeData);

	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);
	//node->m_物体类型.m_UI->m_Update = on_参数修改更新节点;
	//props.push_back(node->m_物体类型);
	plane->f_构建属性部件(props);
}

C_节点面板* f_节点构建_引用物体节点(S_UI创建环境& ctx, S_设备环境& view3D_ctx, C_节点基类* node, C_节点树* tree) {
	if (!node) node = new C_引用物体节点(view3D_ctx);
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_引用物体节点(plane, node);
	return plane;
}

void f_节点重置_引用物体节点(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板重构(plane, node, E_节点区类型::e_节点区_节点视图);
	f_节点重构_插座重构(plane, node, E_节点区类型::e_节点区_节点视图);

	plane->m_属性面板参数构建 = f_引用物体节点_部件构建属性;
	plane->m_ICO = "警告";
}




static void f_取物体节点_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_取物体节点* node = dynamic_cast<C_取物体节点*>(((C_节点面板*)obj)->m_NodeData);

	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);
	//node->m_物体类型.m_UI->m_Update = on_参数修改更新节点;
	//props.push_back(node->m_物体类型);
	plane->f_构建属性部件(props);
}


C_节点面板* f_节点构建_取物体节点(S_UI创建环境& ctx, S_设备环境& view3D_ctx, C_节点基类* node, C_节点树* tree) {
	if (!node) node = new C_引用物体节点(view3D_ctx);
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_取物体节点(plane, node);
	return plane;
}

void f_节点重置_取物体节点(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板重构(plane, node, E_节点区类型::e_节点区_节点视图);
	f_节点重构_插座重构(plane, node, E_节点区类型::e_节点区_节点视图);
	plane->m_属性面板参数构建 = f_取物体节点_部件构建属性;
	plane->m_ICO = "警告";
}



static void f_查找子物体节点_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_查找子物体节点* node = dynamic_cast<C_查找子物体节点*>(((C_节点面板*)obj)->m_NodeData);

	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);
	node->m_查找类型.m_UI->m_Update = on_参数修改更新节点;
	props.push_back(node->m_查找类型);
	plane->f_构建属性部件(props);
}

C_节点面板* f_节点构建_查找子物体节点(S_UI创建环境& ctx, S_设备环境& ctx_3d, C_节点基类* node, C_节点树* tree) {
	if (!node) {
		node = new C_查找子物体节点(ctx_3d);
		node->m_ICO = "0空";
	}
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_查找子物体节点(plane, node);
	return plane;
}

void f_节点重置_查找子物体节点(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板重构(plane, node, E_节点区类型::e_节点区_节点视图);
	f_节点重构_插座重构(plane, node, E_节点区类型::e_节点区_节点视图);
	plane->m_属性面板参数构建 = f_查找子物体节点_部件构建属性;
	plane->m_ICO = node->m_ICO;
}



static void f_物体父子关系_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_物体父子关系节点* node = dynamic_cast<C_物体父子关系节点*>(((C_节点面板*)obj)->m_NodeData);

	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);
	
	plane->f_构建属性部件(props);
}

C_节点面板* f_节点构建_物体父子关系节点(S_UI创建环境& ctx, S_设备环境& view3D_ctx, C_节点基类* node, C_节点树* tree) {
	if (!node) node = new C_物体父子关系节点(view3D_ctx);
	//if (plane == nullptr) {
	//	plane = f_节点创建_UI面板构建(ctx, node, E_节点区类型::e_节点区_物体);
	//}
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_物体父子关系节点(plane, node);
	return plane;
}

void f_节点重置_物体父子关系节点(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板重构(plane, node, E_节点区类型::e_节点区_节点视图);
	f_节点重构_插座重构(plane, node, E_节点区类型::e_节点区_节点视图);

	plane->m_属性面板参数构建 = f_物体父子关系_部件构建属性;
	plane->m_ICO = "objects";
}


static void f_设置物体数据_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_设置物体数据节点* node = dynamic_cast<C_设置物体数据节点*>(((C_节点面板*)obj)->m_NodeData);

	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);

	plane->f_构建属性部件(props);
}

C_节点面板* f_节点构建_设置物体数据节点(S_UI创建环境& ctx, S_设备环境& view3D_ctx, C_节点基类* node, C_节点树* tree) {
	if (!node) node = new C_设置物体数据节点(view3D_ctx);
	//if (plane == nullptr) {
	//	plane = f_节点创建_UI面板构建(ctx, node, E_节点区类型::e_节点区_物体);
	//}
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_设置物体数据节点(plane, node);
	return plane;
}

void f_节点重置_设置物体数据节点(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板重构(plane, node, E_节点区类型::e_节点区_节点视图);
	f_节点重构_插座重构(plane, node, E_节点区类型::e_节点区_节点视图);

	plane->m_属性面板参数构建 = f_设置物体数据_部件构建属性;
	plane->m_ICO = "objects";
}









static void f_物体拷贝_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_物体拷贝节点* node = dynamic_cast<C_物体拷贝节点*>(((C_节点面板*)obj)->m_NodeData);

	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);

	node->m_是否实例.m_UI->m_Update = on_参数修改更新节点;
	props.push_back(node->m_是否实例);

	plane->f_构建属性部件(props);
}

C_节点面板* f_节点构建_物体拷贝节点(S_UI创建环境& ctx, S_设备环境& view_ctx, C_节点基类* node, C_节点树* tree) {
	if (!node) node = new C_物体拷贝节点(view_ctx);

	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_物体拷贝节点(plane, node);
	return plane;
}

void f_节点重置_物体拷贝节点(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板重构(plane, node, E_节点区类型::e_节点区_节点视图);
	f_节点重构_插座重构(plane, node, E_节点区类型::e_节点区_节点视图);

	plane->m_属性面板参数构建 = f_物体拷贝_部件构建属性;
	plane->m_ICO = "defraggler";
}



static void f_对称物体_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_物体对称节点* node = dynamic_cast<C_物体对称节点*>(((C_节点面板*)obj)->m_NodeData);

	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);

	plane->f_构建属性部件(props);
}

C_节点面板* f_节点构建_对称物体节点(S_UI创建环境& ctx, S_设备环境& view3D_ctx, C_节点基类* node, C_节点树* tree) {
	if (!node) node = new C_物体对称节点(view3D_ctx);
	//if (plane == nullptr) {
	//	plane = f_节点创建_UI面板构建(ctx, node, E_节点区类型::e_节点区_物体);
	//}
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_对称物体节点(plane, node);

	return plane;
}

void f_节点重置_对称物体节点(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板重构(plane, node, E_节点区类型::e_节点区_节点视图);
	f_节点重构_插座重构(plane, node, E_节点区类型::e_节点区_节点视图);

	plane->m_属性面板参数构建 = f_对称物体_部件构建属性;
	plane->m_ICO = "objects";
}





static void f_取物体属性_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_取物体属性节点* node = dynamic_cast<C_取物体属性节点*>(((C_节点面板*)obj)->m_NodeData);

	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);

	plane->f_构建属性部件(props);
}

C_节点面板* f_节点构建_取物体属性节点(S_UI创建环境& ctx, S_设备环境& view_ctx, C_节点基类* node, C_节点树* tree) {
	if (!node) node = new C_取物体属性节点(view_ctx);
	//if (plane == nullptr) {
	//	plane = f_节点创建_UI面板构建(ctx, node, E_节点区类型::e_节点区_物体);
	//}
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_取物体属性节点(plane, node);

	return plane;
}

void f_节点重置_取物体属性节点(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板重构(plane, node, E_节点区类型::e_节点区_节点视图);
	f_节点重构_插座重构(plane, node, E_节点区类型::e_节点区_节点视图);

	plane->m_属性面板参数构建 = f_取物体属性_部件构建属性;
	plane->m_ICO = "objects";
}



static void f_取物体变换节点_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_取物体变换节点* node = dynamic_cast<C_取物体变换节点*>(((C_节点面板*)obj)->m_NodeData);

	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);

	plane->f_构建属性部件(props);
}

C_节点面板* f_节点构建_取物体变换节点(S_UI创建环境& ctx, S_设备环境& ctx_3d, C_节点基类* node, C_节点树* tree) {
	if (!node) {
		node = new C_取物体变换节点(ctx_3d);
		node->m_ICO = "0空";
	}
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_取物体变换节点(plane, node);
	return plane;
}

void f_节点重置_取物体变换节点(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板重构(plane, node, E_节点区类型::e_节点区_节点视图);
	f_节点重构_插座重构(plane, node, E_节点区类型::e_节点区_节点视图);

	plane->m_属性面板参数构建 = f_取物体变换节点_部件构建属性;
	plane->m_ICO = node->m_ICO;
}



static void f_取物体矩阵节点_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_取物体矩阵节点* node = dynamic_cast<C_取物体矩阵节点*>(((C_节点面板*)obj)->m_NodeData);
	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);
	plane->f_构建属性部件(props);
}

C_节点面板* f_节点构建_取物体矩阵节点(S_UI创建环境& ctx, S_设备环境& ctx_3d, C_节点基类* node, C_节点树* tree) {
	if (!node) {
		node = new C_取物体矩阵节点(ctx_3d);
		node->m_ICO = "0空";
	}
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_取物体矩阵节点(plane, node);
	return plane;
}

void f_节点重置_取物体矩阵节点(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板重构(plane, node, E_节点区类型::e_节点区_节点视图);
	f_节点重构_插座重构(plane, node, E_节点区类型::e_节点区_节点视图);

	plane->m_属性面板参数构建 = f_取物体矩阵节点_部件构建属性;
	plane->m_ICO = node->m_ICO;
}













static void f_设置物体矩阵_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_设置物体矩阵节点* node = dynamic_cast<C_设置物体矩阵节点*>(((C_节点面板*)obj)->m_NodeData);

	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);

	plane->f_构建属性部件(props);
}

C_节点面板* f_节点构建_设置物体矩阵节点(S_UI创建环境& ctx, S_设备环境& view3D_ctx, C_节点基类* node, C_节点树* tree) {
	if (!node) node = new C_设置物体矩阵节点(view3D_ctx);
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_设置物体矩阵节点(plane, node);
	return plane;
}

void f_节点重置_设置物体矩阵节点(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板重构(plane, node, E_节点区类型::e_节点区_节点视图);
	f_节点重构_插座重构(plane, node, E_节点区类型::e_节点区_节点视图);

	plane->m_属性面板参数构建 = f_设置物体矩阵_部件构建属性;
	plane->m_ICO = "defraggler";
}




static void f_物体绑定骨骼_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_设置物体矩阵节点* node = dynamic_cast<C_设置物体矩阵节点*>(((C_节点面板*)obj)->m_NodeData);

	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);

	plane->f_构建属性部件(props);
}

C_节点面板* f_节点构建_物体绑定骨骼节点(S_UI创建环境& ctx, S_设备环境& view3D_ctx, C_节点基类* node, C_节点树* tree) {
	if (!node) node = new C_物体绑定骨骼节点(view3D_ctx);
	//if (nullptr == plane) {
	//	plane = f_节点创建_UI面板构建(ctx, node, E_节点区类型::e_节点区_节点视图);
	//}
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_物体绑定骨骼节点(plane, node);
	return plane;
}
void f_节点重置_物体绑定骨骼节点(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板重构(plane, node, E_节点区类型::e_节点区_节点视图);
	f_节点重构_插座重构(plane, node, E_节点区类型::e_节点区_节点视图);

	plane->m_属性面板参数构建 = f_物体绑定骨骼_部件构建属性;
	plane->m_ICO = "defraggler";
}





void f_PropUpdate_物体变换(S_Props& prop) {

}

static void f_设置物体变换节点_3D视口更新(C_节点面板* node, S_Scene* scene) {
	C_设置物体变换节点* 节点 = dynamic_cast<C_设置物体变换节点*>(node->m_NodeData);

}

static void f_设置物体变换_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_设置物体变换节点* node = dynamic_cast<C_设置物体变换节点*>(((C_节点面板*)obj)->m_NodeData);

	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);

	plane->f_构建属性部件(props);
}

C_节点面板* f_节点构建_设置物体变换节点(S_UI创建环境& ctx, S_设备环境& view_ctx, C_节点基类* node, C_节点树* tree) {
	if (!node) {
		node = new C_设置物体变换节点(view_ctx);
		node->m_ICO = "0空";
	}
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_设置物体变换节点(plane, node);

	return plane;
}

void f_节点重置_设置物体变换节点(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板重构(plane, node, E_节点区类型::e_节点区_节点视图);
	f_节点重构_插座重构(plane, node, E_节点区类型::e_节点区_节点视图);

	plane->m_属性面板参数构建 = f_设置物体变换_部件构建属性;
	plane->m_3D视口更新 = f_设置物体变换节点_3D视口更新;
	plane->m_ICO = node->m_ICO;
}




static void f_设置摄像机属性节点_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_设置摄像机属性节点* node = dynamic_cast<C_设置摄像机属性节点*>(((C_节点面板*)obj)->m_NodeData);

	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);
	//node->m_视点距离.m_UI->m_Update = on_参数修改更新节点;
	//props.push_back(node->m_视点距离);
	plane->f_构建属性部件(props);
}

C_节点面板* f_节点构建_设置摄像机属性节点(S_UI创建环境& ctx, S_设备环境& ctx_3d, C_节点基类* node, C_节点树* tree) {
	if (!node) {
		node = new C_设置摄像机属性节点(ctx_3d);
		node->m_ICO = "0空";
	}
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_设置摄像机属性节点(plane, node);
	return plane;
}

void f_节点重置_设置摄像机属性节点(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板重构(plane, node, E_节点区类型::e_节点区_节点视图);
	f_节点重构_插座重构(plane, node, E_节点区类型::e_节点区_节点视图);

	plane->m_属性面板参数构建 = f_设置摄像机属性节点_部件构建属性;
	plane->m_ICO = node->m_ICO;
}











/*static void f_记录点节点_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	//S_Props	prop = f_alloc_OpsProp(f_Operator初始化跟踪点, obj);
	//plane->m_属性.push_back(prop);
	//f_区管理_设置当前操作节点(((C_节点面板*)obj)->m_NodeData);
	C_记录点节点* node = dynamic_cast<C_记录点节点*>(((C_节点面板*)obj)->m_NodeData);

	std::vector<S_Props> props;

	//S_Props	prop = f_alloc_OpsProp(node->m_执行Ops, L"记录");
	props.push_back(node->m_开启点烘焙);

	plane->f_构建属性部件(props);

}


C_节点面板* f_节点构建_记录点节点(S_UI创建环境& ctx, C_节点基类* node, C_节点树* tree) {
	if (!node) node = new C_记录点节点(ctx.m_Ctx);

	C_节点面板* nodeplane = f_节点创建_UI面板构建(ctx, node, E_节点区类型::e_节点区_节点视图);
	nodeplane->m_属性面板参数构建 = f_记录点节点_部件构建属性;
	nodeplane->m_ICO = "trends";

	return nodeplane;
}

void f_节点重置_记录点节点(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板重构(plane, node, E_节点区类型::e_节点区_节点视图);
	f_节点重构_插座重构(plane, node, E_节点区类型::e_节点区_节点视图);

	plane->m_属性面板参数构建 = f_记录点节点_部件构建属性;
	plane->m_ICO = "trends";
}*/












static void f_外部加载物体节点_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_外部加载物体节点* node = dynamic_cast<C_外部加载物体节点*>(((C_节点面板*)obj)->m_NodeData);

	std::vector<S_Props> props;
	bool 继续添加 = f_节点重构_重构属性面板数据((C_节点面板*)obj, props);

	if (继续添加) {
		props.push_back(node->m_是否递归目录);
		props.push_back(node->m_是否序列);
		props.push_back(node->m_Path);
		//props.push_back(node->m_文件类型);
		//props.push_back(node->m_瓦片);
		node->m_Path.m_UI->m_Update = on_加载模型更新节点;
	}
	
	

	plane->f_构建属性部件(props);

}


C_节点面板* f_节点构建_外部加载物体节点(S_UI创建环境& ctx, S_设备环境& view_ctx, C_节点基类* node, C_节点树* tree) {
	if (!node) node = new C_外部加载物体节点(view_ctx);

	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_外部加载物体节点(plane, node);
	return plane;
}

void f_节点重置_外部加载物体节点(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板重构(plane, node, E_节点区类型::e_节点区_节点视图);
	f_节点重构_插座重构(plane, node, E_节点区类型::e_节点区_节点视图);

	plane->m_属性面板参数构建 = f_外部加载物体节点_部件构建属性;
	//plane->m_3D视口更新 = f_外部加载物体节点_3D视口更新;
	plane->m_ICO = "document";
}



static void f_加载模型节点_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_加载模型节点* node = dynamic_cast<C_加载模型节点*>(((C_节点面板*)obj)->m_NodeData);

	std::vector<S_Props> props;
	bool 继续添加 = f_节点重构_重构属性面板数据((C_节点面板*)obj, props);

	if (继续添加) {
		//props.push_back(node->m_是否递归目录);
	}
	//node->m_Path.m_UI->m_Update = on_加载模型更新节点;

	plane->f_构建属性部件(props);

}

C_节点面板* f_节点构建_加载模型节点(S_UI创建环境& ctx, S_设备环境& ctx_3d, C_节点基类* node, C_节点树* tree) {
	if (!node) {
		node = new C_加载模型节点(ctx_3d);
		node->m_ICO = "0空";
	}
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_加载模型节点(plane, node);
	return plane;
}

void f_节点重置_加载模型节点(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板插座重构(plane, node, E_节点区类型::e_节点区_节点视图);
	plane->m_属性面板参数构建 = f_加载模型节点_部件构建属性;
	plane->m_ICO = node->m_ICO;
}




static void f_骨骼节点_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_骨架节点* node = dynamic_cast<C_骨架节点*>(((C_节点面板*)obj)->m_NodeData);

	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);

	node->m_前端显示.m_UI->m_Update = on_参数修改更新节点;
	props.push_back(node->m_前端显示);

	plane->f_构建属性部件(props);
}

C_节点面板* f_节点构建_骨骼节点(S_UI创建环境& ctx, S_设备环境& view3D_ctx, C_节点基类* node, C_节点树* tree) {
	if (!node) node = new C_骨架节点(view3D_ctx);
	//if (nullptr == plane) {
	//	plane = f_节点创建_UI面板构建(ctx, node, E_节点区类型::e_节点区_节点视图);
	//}
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_骨骼节点(plane, node);
	return plane;
}

void f_节点重置_骨骼节点(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板重构(plane, node, E_节点区类型::e_节点区_节点视图);
	f_节点重构_插座重构(plane, node, E_节点区类型::e_节点区_节点视图);

	plane->m_属性面板参数构建 = f_骨骼节点_部件构建属性;
	plane->m_ICO = "ico_骨骼0021";
}



static void f_骨头节点_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_骨头节点* node = dynamic_cast<C_骨头节点*>(((C_节点面板*)obj)->m_NodeData);

	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);
	plane->f_构建属性部件(props);
}

C_节点面板* f_节点构建_骨头节点(S_UI创建环境& ctx, S_设备环境& view3D_ctx, C_节点基类* node, C_节点树* tree) {
	if (!node) node = new C_骨头节点(view3D_ctx);
	//if (nullptr == plane) {
	//	plane = f_节点创建_UI面板构建(ctx, node, E_节点区类型::e_节点区_节点视图);
	//}
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_骨头节点(plane, node);
	return plane;
}

void f_节点重置_骨头节点(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板重构(plane, node, E_节点区类型::e_节点区_节点视图);
	f_节点重构_插座重构(plane, node, E_节点区类型::e_节点区_节点视图);

	plane->m_属性面板参数构建 = f_骨头节点_部件构建属性;
	plane->m_ICO = "ico_骨头0022";
}



static void f_骨骼IK节点_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_骨骼IK节点* node = dynamic_cast<C_骨骼IK节点*>(((C_节点面板*)obj)->m_NodeData);

	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);
	//props.push_back(node->m_Path);
	//for (auto& e : props) {
	//	e.m_UI->m_Update = on_参数修改更新节点;
	//}
	//node->m_Path.m_UI->m_Update = on_加载模型更新节点;
	props.push_back(node->m_迭代次数);
	props.push_back(node->m_虚拟体类型);
	node->m_迭代次数.m_UI->m_Update = on_参数修改更新节点;
	node->m_虚拟体类型.m_UI->m_Update = on_参数修改更新节点;

	plane->f_构建属性部件(props);
}

C_节点面板* f_节点构建_骨骼IK节点(S_UI创建环境& ctx, S_设备环境& view3D_ctx, C_节点基类* node, C_节点树* tree) {
	if (!node) node = new C_骨骼IK节点(view3D_ctx);
	//if (nullptr == plane) {
	//	plane = f_节点创建_UI面板构建(ctx, node, E_节点区类型::e_节点区_节点视图);
	//}
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_骨骼IK节点(plane, node);
	return plane;
}

void f_节点重置_骨骼IK节点(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板重构(plane, node, E_节点区类型::e_节点区_节点视图);
	f_节点重构_插座重构(plane, node, E_节点区类型::e_节点区_节点视图);

	plane->m_属性面板参数构建 = f_骨骼IK节点_部件构建属性;
	plane->m_ICO = "ico_IK0023";
}





static void f_蒙皮节点_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_蒙皮节点* node = dynamic_cast<C_蒙皮节点*>(((C_节点面板*)obj)->m_NodeData);

	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);
	
	props.push_back(node->m_自动权重);
	node->m_自动权重.m_UI->m_Update = on_参数修改更新节点;

	props.push_back(node->m_封套颜色长度);
	node->m_封套颜色长度.m_UI->m_Update = on_参数修改更新节点;

	plane->f_构建属性部件(props);
}

C_节点面板* f_节点构建_蒙皮节点(S_UI创建环境& ctx, S_设备环境& view3D_ctx, C_节点基类* node, C_节点树* tree) {
	if (!node) node = new C_蒙皮节点(view3D_ctx);
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_蒙皮节点(plane, node);
	return plane;
}

void f_节点重置_蒙皮节点(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板重构(plane, node, E_节点区类型::e_节点区_节点视图);
	f_节点重构_插座重构(plane, node, E_节点区类型::e_节点区_节点视图);

	plane->m_属性面板参数构建 = f_蒙皮节点_部件构建属性;
	plane->m_ICO = "注意";
}




static void f_摄像机节点_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_摄像机节点* node = dynamic_cast<C_摄像机节点*>(((C_节点面板*)obj)->m_NodeData);

	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);

	//props.push_back(node->m_自动权重);
	//node->m_自动权重.m_UI->m_Update = on_参数修改更新节点;

	plane->f_构建属性部件(props);
}

C_节点面板* f_节点构建_摄像机节点(S_UI创建环境& ctx, S_设备环境& view3D_ctx, C_节点基类* node, C_节点树* tree) {
	if (!node) {
		node = new C_摄像机节点(view3D_ctx);
		node->m_ICO = "ico_相机0000";
	}
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_摄像机节点(plane, node);
	return plane;
}

void f_节点重置_摄像机节点(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板插座重构(plane, node, E_节点区类型::e_节点区_节点视图);
	plane->m_属性面板参数构建 = f_摄像机节点_部件构建属性;
	plane->m_ICO = node->m_ICO;
}



static void f_目标摄像机节点_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_目标摄像机节点* node = dynamic_cast<C_目标摄像机节点*>(((C_节点面板*)obj)->m_NodeData);

	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);

	//props.push_back(node->m_自动权重);
	//node->m_自动权重.m_UI->m_Update = on_参数修改更新节点;

	plane->f_构建属性部件(props);
}

C_节点面板* f_节点构建_目标摄像机节点(S_UI创建环境& ctx, S_设备环境& view3D_ctx, C_节点基类* node, C_节点树* tree) {
	if (!node) {
		node = new C_目标摄像机节点(view3D_ctx);
		node->m_ICO = "ico_相机0000";
	}
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_目标摄像机节点(plane, node);
	return plane;
}

void f_节点重置_目标摄像机节点(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板插座重构(plane, node, E_节点区类型::e_节点区_节点视图);
	plane->m_属性面板参数构建 = f_目标摄像机节点_部件构建属性;
	plane->m_ICO = node->m_ICO;
}




static void f_物体虚拟体节点_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_物体虚拟体节点* node = dynamic_cast<C_物体虚拟体节点*>(((C_节点面板*)obj)->m_NodeData);
	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);

	props.push_back(node->m_虚拟体网格类型);
	node->m_虚拟体网格类型.m_UI->m_Update = on_参数修改更新节点;

	plane->f_构建属性部件(props);
}

C_节点面板* f_节点构建_物体虚拟体节点(S_UI创建环境& ctx, S_设备环境& ctx_3d, C_节点基类* node, C_节点树* tree) {
	if (!node) {
		node = new C_物体虚拟体节点(ctx_3d);
		node->m_ICO = "ico编辑网格0014";
	}
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_物体虚拟体节点(plane, node);
	return plane;
}

void f_节点重置_物体虚拟体节点(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板插座重构(plane, node, E_节点区类型::e_节点区_节点视图);
	plane->m_属性面板参数构建 = f_物体虚拟体节点_部件构建属性;
	plane->m_ICO = "0空";
}




static void f_点光源节点_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_点光源节点* node = dynamic_cast<C_点光源节点*>(((C_节点面板*)obj)->m_NodeData);

	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);
	node->m_灯光标志位.m_UI->m_Update = on_参数修改更新节点;
	props.push_back(node->m_灯光标志位);
	plane->f_构建属性部件(props);
}
C_节点面板* f_节点构建_点光源节点(S_UI创建环境& ctx, S_设备环境& view3D_ctx, C_节点基类* node, C_节点树* tree) {
	if (!node) {
		node = new C_点光源节点(view3D_ctx);
		node->m_ICO = "ico_点灯亮0000";
	}
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_点光源节点(plane, node);
	return plane;
}
void f_节点重置_点光源节点(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板重构(plane, node, E_节点区类型::e_节点区_节点视图);
	f_节点重构_插座重构(plane, node, E_节点区类型::e_节点区_节点视图);

	plane->m_属性面板参数构建 = f_点光源节点_部件构建属性;
	plane->m_ICO = node->m_ICO;
}


static void f_面光源节点_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_区域光节点* node = dynamic_cast<C_区域光节点*>(((C_节点面板*)obj)->m_NodeData);

	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);

	node->m_形状类型.m_UI->m_Update = on_区域光参数修改更新节点;
	props.push_back(node->m_形状类型);
	node->m_灯光标志位.m_UI->m_Update = on_参数修改更新节点;
	props.push_back(node->m_灯光标志位);
	plane->f_构建属性部件(props);
}
C_节点面板* f_节点构建_面光源节点(S_UI创建环境& ctx, S_设备环境& view3D_ctx, C_节点基类* node, C_节点树* tree) {
	if (!node) {
		node = new C_区域光节点(view3D_ctx);
		node->m_ICO = "ico_点灯亮0000";
	}
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_面光源节点(plane, node);
	return plane;
}
void f_节点重置_面光源节点(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板重构(plane, node, E_节点区类型::e_节点区_节点视图);
	f_节点重构_插座重构(plane, node, E_节点区类型::e_节点区_节点视图);

	plane->m_属性面板参数构建 = f_面光源节点_部件构建属性;
	plane->m_ICO = node->m_ICO;
}



static void f_聚光灯节点_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_聚光灯节点* node = dynamic_cast<C_聚光灯节点*>(((C_节点面板*)obj)->m_NodeData);

	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);
	node->m_灯光标志位.m_UI->m_Update = on_参数修改更新节点;
	props.push_back(node->m_灯光标志位);
	plane->f_构建属性部件(props);
}
C_节点面板* f_节点构建_聚光灯节点(S_UI创建环境& ctx, S_设备环境& view3D_ctx, C_节点基类* node, C_节点树* tree) {
	if (!node) {
		node = new C_聚光灯节点(view3D_ctx);
		node->m_ICO = "ico_点灯亮0000";
	}
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_聚光灯节点(plane, node);
	return plane;
}
void f_节点重置_聚光灯节点(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板重构(plane, node, E_节点区类型::e_节点区_节点视图);
	f_节点重构_插座重构(plane, node, E_节点区类型::e_节点区_节点视图);

	plane->m_属性面板参数构建 = f_聚光灯节点_部件构建属性;
	plane->m_ICO = node->m_ICO;
}



static void f_平行光节点_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_平行光节点* node = dynamic_cast<C_平行光节点*>(((C_节点面板*)obj)->m_NodeData);

	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);
	node->m_灯光标志位.m_UI->m_Update = on_参数修改更新节点;
	props.push_back(node->m_灯光标志位);
	plane->f_构建属性部件(props);
}
C_节点面板* f_节点构建_平行光节点(S_UI创建环境& ctx, S_设备环境& view3D_ctx, C_节点基类* node, C_节点树* tree) {
	if (!node) {
		node = new C_平行光节点(view3D_ctx);
		node->m_ICO = "ico_点灯亮0000";
	}
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_平行光节点(plane, node);
	return plane;
}
void f_节点重置_平行光节点(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板插座重构(plane, node, E_节点区类型::e_节点区_节点视图);
	plane->m_属性面板参数构建 = f_平行光节点_部件构建属性;
	plane->m_ICO = node->m_ICO;
}



static void f_取物体材质节点_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_取物体材质节点* node = dynamic_cast<C_取物体材质节点*>(((C_节点面板*)obj)->m_NodeData);

	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);

	plane->f_构建属性部件(props);
}
C_节点面板* f_节点构建_取物体材质节点(S_UI创建环境& ctx, S_设备环境& view3D_ctx, C_节点基类* node, C_节点树* tree) {
	if (!node) node = new C_取物体材质节点(view3D_ctx);
	//if (nullptr == plane) {
	//	plane = f_节点创建_UI面板构建(ctx, node, E_节点区类型::e_节点区_节点视图);
	//}
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_平行光节点(plane, node);
	return plane;
}
void f_节点重置_取物体材质节点(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板重构(plane, node, E_节点区类型::e_节点区_节点视图);
	f_节点重构_插座重构(plane, node, E_节点区类型::e_节点区_节点视图);

	plane->m_属性面板参数构建 = f_取物体材质节点_部件构建属性;
	plane->m_ICO = "ico_IK0023";
}




static void f_取物体光追材质节点_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_取物体光追材质节点* node = dynamic_cast<C_取物体光追材质节点*>(((C_节点面板*)obj)->m_NodeData);

	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);

	plane->f_构建属性部件(props);
}
C_节点面板* f_节点构建_取物体光追材质节点(S_UI创建环境& ctx, S_设备环境& view3D_ctx, C_节点基类* node, C_节点树* tree) {
	if (!node) node = new C_取物体光追材质节点(view3D_ctx);
	//if (nullptr == plane) {
	//	plane = f_节点创建_UI面板构建(ctx, node, E_节点区类型::e_节点区_节点视图);
	//}
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_平行光节点(plane, node);
	return plane;
}
void f_节点重置_取物体光追材质节点(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板重构(plane, node, E_节点区类型::e_节点区_节点视图);
	f_节点重构_插座重构(plane, node, E_节点区类型::e_节点区_节点视图);

	plane->m_属性面板参数构建 = f_取物体光追材质节点_部件构建属性;
	plane->m_ICO = "ico_IK0023";
}




static void f_选择物体节点_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_选择物体节点* node = dynamic_cast<C_选择物体节点*>(((C_节点面板*)obj)->m_NodeData);
	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);
	props.push_back(node->m_物体列表);
	plane->f_构建属性部件(props);
}

C_节点面板* f_节点构建_选择物体节点(S_UI创建环境& ctx, S_设备环境& ctx_3d, C_节点基类* node, C_节点树* tree) {
	if (!node) {
		node = new C_选择物体节点(ctx_3d);
		node->m_ICO = "ico编辑网格0014";
	}
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_选择物体节点(plane, node);
	return plane;
}

void f_节点重置_选择物体节点(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板重构(plane, node, E_节点区类型::e_节点区_节点视图);
	f_节点重构_插座重构(plane, node, E_节点区类型::e_节点区_节点视图);

	plane->m_属性面板参数构建 = f_选择物体节点_部件构建属性;
	plane->m_ICO = node->m_ICO;
}







bool f_物体节点重构(C_节点面板** plane, C_节点基类* node, S_UI创建环境* ctx) {
	if (node->m_TypeName == "物体节点") {
		if (!plane[0]) plane[0] = f_节点构建_物体节点(*ctx, *S_框架::g_3D视口环境, node);
		else f_节点重置_物体节点(plane[0], node);
	}
	else if (node->m_TypeName == "取物体属性节点") {
		if (!plane[0]) plane[0] = f_节点构建_取物体属性节点(*ctx, *S_框架::g_3D视口环境, node);
		else f_节点重置_取物体属性节点(plane[0], node);
	}
	else if (node->m_TypeName == DEF_取物体材质节点) {
		if (!plane[0]) plane[0] = f_节点构建_取物体材质节点(*ctx, *S_框架::g_3D视口环境, node);
		else f_节点重置_取物体材质节点(plane[0], node);
	}
	else if (node->m_TypeName == DEF_取物体光追材质节点) {
		if (!plane[0]) plane[0] = f_节点构建_取物体光追材质节点(*ctx, *S_框架::g_3D视口环境, node);
		else f_节点重置_取物体光追材质节点(plane[0], node);
	}
	else if (node->m_TypeName == "物体拷贝节点") {
		if (!plane[0]) plane[0] = f_节点构建_物体拷贝节点(*ctx, *S_框架::g_3D视口环境, node);
		else f_节点重置_物体拷贝节点(plane[0], node);
	}
	else if (node->m_TypeName == "物体对称节点") {
		if (!plane[0]) plane[0] = f_节点构建_对称物体节点(*ctx, *S_框架::g_3D视口环境, node);
		else f_节点重置_对称物体节点(plane[0], node);
	}
	else if (node->m_TypeName == "设置物体矩阵节点") {
		if (!plane[0]) plane[0] = f_节点构建_设置物体矩阵节点(*ctx, *S_框架::g_3D视口环境, node);
		else f_节点重置_设置物体矩阵节点(plane[0], node);
	}
	else if (node->m_TypeName == "设置物体变换节点") {
		if (!plane[0]) plane[0] = f_节点构建_设置物体变换节点(*ctx, *S_框架::g_3D视口环境, node);
		else f_节点重置_设置物体变换节点(plane[0], node);
	}
	else if (node->m_TypeName == "物体绑定骨骼节点") {
		if (!plane[0]) plane[0] = f_节点构建_物体绑定骨骼节点(*ctx, *S_框架::g_3D视口环境, node);
		else f_节点重置_物体绑定骨骼节点(plane[0], node);
	}
	else if (node->m_TypeName == "外部加载物体节点") {
		if (!plane[0]) plane[0] = f_节点构建_外部加载物体节点(*ctx, *S_框架::g_3D视口环境, node);
		else f_节点重置_外部加载物体节点(plane[0], node);
	}
	else if (node->m_TypeName == "骨骼节点") {
		if (!plane[0]) plane[0] = f_节点构建_骨骼节点(*ctx, *S_框架::g_3D视口环境, node);
		else f_节点重置_骨骼节点(plane[0], node);
	}
	else if (node->m_TypeName == "骨头节点") {
		if (!plane[0]) plane[0] = f_节点构建_骨头节点(*ctx, *S_框架::g_3D视口环境, node);
		else f_节点重置_骨头节点(plane[0], node);
	}
	else if (node->m_TypeName == "骨骼IK节点") {
		if (!plane[0]) plane[0] = f_节点构建_骨骼IK节点(*ctx, *S_框架::g_3D视口环境, node);
		else f_节点重置_骨骼IK节点(plane[0], node);
	}
	else if (node->m_TypeName == "蒙皮节点") {
		if (!plane[0]) plane[0] = f_节点构建_蒙皮节点(*ctx, *S_框架::g_3D视口环境, node);
		else f_节点重置_蒙皮节点(plane[0], node);
	}

	else if (node->m_TypeName == DEF_平行光节点) {
		if (!plane[0]) plane[0] = f_节点构建_平行光节点(*ctx, *S_框架::g_3D视口环境, node);
		else f_节点重置_平行光节点(plane[0], node);
	}
	else if (node->m_TypeName == DEF_聚光灯节点) {
		if (!plane[0]) plane[0] = f_节点构建_聚光灯节点(*ctx, *S_框架::g_3D视口环境, node);
		else f_节点重置_聚光灯节点(plane[0], node);
	}
	else if (node->m_TypeName == DEF_点光源节点) {
		if (!plane[0]) plane[0] = f_节点构建_点光源节点(*ctx, *S_框架::g_3D视口环境, node);
		else f_节点重置_点光源节点(plane[0], node);
	}
	else if (node->m_TypeName == DEF_区域光节点) {
		if (!plane[0]) plane[0] = f_节点构建_面光源节点(*ctx, *S_框架::g_3D视口环境, node);
		else f_节点重置_面光源节点(plane[0], node);
	}

	else {
		return false;
	}

	return true;
}











